<!-- 盘煤记录 -->
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { Refresh, EditPen } from '@element-plus/icons-vue'
import { ElMessage, ElMessageBox, type FormInstance } from 'element-plus'
import { useRouter } from "vue-router";

const router = useRouter();
interface InState {
    /** 数据状态 */
    loading: boolean;
    /** 差值数据状态 */
    loadingDiff: {
        [key: string]: boolean;
    };
    /** 差值数据 */
    diffData: {
        [key: string]: any;
    }
    /** 附件地址 */
    fileUrl: string;
    /** 展开行数组 */
    expandRowKeys: number[];
}
/** 数据 */
let state = ref<InState>({
    loading: false,
    loadingDiff: {},
    diffData: {},
    fileUrl: "",
    expandRowKeys: []
})
// table-list 搜索
const searchTime = ref('')
const today = new Date();

const coalListData = ref(['1#煤场', '2#煤场', '3#煤场'])
const coalIndex = ref(0)

function clickCoal(index: number) {
    coalIndex.value = index
    getFuelWorkTInventoryList();
    state.value.diffData = {};
}

const searchTimeIndex = ref(0)
function clickSearchTime(index: number) {
    searchTimeIndex.value = index
    searchTime.value = ''
}
function changeSearchTime() {
    searchTimeIndex.value = 3
}

//table设置
const tableHeight = ref(0)
const listTableData = ref<any>([])


//table 多选
// const multipleSelection = ref([])
// const handleSelectionChange = (val: never[]) => {
//     multipleSelection.value = val
// }

// 定义表格数据的类型
interface TableRow {
    id: number;
    time: string;
    name: string;
    name1: string;
}

// 保存选中项的 ID 列表
const selectedRowIds = ref<Set<number>>(new Set());

// 处理选中项变化的函数
const handleSelectionChange = (selection: TableRow[]) => {
    // 更新选中项 ID 列表
    selectedRowIds.value = new Set(selection.map((item) => item.id));
};

// 自定义行类名的函数
const rowClassName = ({ row }: { row: TableRow }): string => {
    return selectedRowIds.value.has(row.id) ? 'selected-row' : '';
};

const rowInfoClassName = (id: number) => {
    return selectedRowIds.value.has(id) ? 'selected_bg' : '';
}



//table样式自定义
const headerCellStyle = {
    padding: '16px 0'
}
const headerRowStyle = {
    backgroundColor: "#CCDDF9",
    color: "#333",
    fontWeight: "bold"
}


//table 保存修改
function tableDataSave() {
    tableDialogVisible.value = true
}
const tableDialogVisible = ref(false)
function clickTableDialog() {
    tableDialogVisible.value = false
    ElMessage({
        message: '已修改，数据已更新',
        type: 'success',
    })
    //ElMessage.error('修改失败，请重新提交')
}

// 圆仓
const siloDialogVisible = ref(false)
function clickSiloDialog() {

}
const siloDialogVisible2 = ref(false)

import { pileReport, FuelWorkTInventoryList, GetAllBunkerData, difference, delFuelWorkTInventory, editFuelWorkTInventory, FuelWorkPileReport, AreaByBunkerId, bunkerFileUrl } from "@/api/index";

// 煤场
const bunkerData = ref<any>([])
function getGetAllBunkerData() {
    GetAllBunkerData().then(res => {
        console.log('煤场----', res.data)
        bunkerData.value = res.data
        getFuelWorkTInventoryList()
        // getAreaByBunkerId(bunkerData.value[coalIndex.value].bunkerId)
    })
}

// 区域-下拉框数据
// const AreaBunkerData = ref<any>([])
// const getAreaByBunkerId = (id: any) => {
//     AreaByBunkerId(id).then(res => {
//         console.log('煤场区域----', res.data)
//         AreaBunkerData.value = res.data
//     })
// }

// 搜索
const searchForm = ref({
    ParentBunkerId: '',
    executeTime: '',

    PageNum: 1, //当前页码
    PageSize: 10 //PageSize
})
const totalPage = ref(0)
//searchForm.value.executeTime = today.toISOString().split('T')[0];

//list
const getFuelWorkTInventoryList = () => {
    searchForm.value.ParentBunkerId = bunkerData.value[coalIndex.value].bunkerId;
    FuelWorkTInventoryList(searchForm.value).then(res => {
        console.log('list-------', res.data)
        listTableData.value = res.data.result;
        totalPage.value = res.data.totalNum;

        listTableData.value.forEach((b: any) => {
            if (b.imageNotAvailable) {
                b.fileName = "../assets/img/ph_3d.jpg";
            }
            else {
                var fileName =
                    state.value.fileUrl +
                    b.parentBunkerId +
                    "Stockyard" +
                    "/" +
                    b.fileName +
                    "/" +
                    b.fileName +
                    (b.useNewImage ? ".txt.jpg" : ".txt.bmp");

                b.fileName = fileName;
            }
        });

        // if (listTableData.value.length != 0) {
        //     for (const i in listTableData.value) {
        //         //console.log('与前一次差值-------',listTableData.value[i].executeId)
        //         difference(listTableData.value[i].executeId).then(res => {
        //             //console.log('与前一次差值-------',res.data)
        //             listTableData.value[i].differenceInfo = res.data
        //         })
        //     }
        // }
    })
}

//与前一次差值
const getDifference = (id: any) => {
    difference(id).then(res => {
        console.log('与前一次差值-------', res.data)
    })
}

const expandChange = (row: any, expandedRows: any[]) => {
    // console.log('expandedRows-------', expandedRows)
    if (expandedRows.length) {
        state.value.expandRowKeys = [row.executeId];
    } else {
        state.value.expandRowKeys = [];
    }
    if (expandedRows.length) {
        // console.log('row-------', row, expandedRows)
        state.value.loadingDiff[`${row.executeId}`] = true;
        if (state.value.diffData[`${row.executeId}`]) {
            state.value.loadingDiff[`${row.executeId}`] = false;
            return;
        }
        difference(row.executeId).then(res => {
            // row.differenceInfo = res.data;
            state.value.diffData[`${row.executeId}`] = res.data;
        }).finally(() => {
            state.value.loadingDiff[`${row.executeId}`] = false;
        })
    }
}

const resetForm = () => {
    searchForm.value.executeTime = ''
    getFuelWorkTInventoryList()
}

const shortcuts = [
    {
        text: '今天',
        value: new Date(),
    },
    {
        text: '昨天',
        value: () => {
            const date = new Date()
            date.setTime(date.getTime() - 3600 * 1000 * 24)
            return date
        },
    },
    {
        text: '一周前',
        value: () => {
            const date = new Date()
            date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
            return date
        },
    },
    {
        text: '一个月前',
        value: () => {
            const date = new Date()
            date.setTime(date.getTime() - 3600 * 1000 * 24 * 30)
            return date
        },
    },
]

// 删除
const clickDelFuelWorkTInventory = (id: any) => {
    ElMessageBox.confirm(
        '是否确定删除，删除后不能恢复?',
        '提示',
        {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
        }
    )
        .then(() => {
            delFuelWorkTInventory(id).then(res => {
                console.log('删除----', res)
                if (res.code === 200) {
                    ElMessage({
                        type: 'success',
                        message: '已成功删除',
                    })
                    getFuelWorkTInventoryList()
                }
                else {
                    ElMessage.error('删除失败，请重新删除')
                }
            })
        })
}

// 修改
const clickEditDeviceTEnvmonitor = (item: any) => {
    ElMessageBox.prompt('请输入密度', '修改', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        inputPattern: /^[0-9]+(\.[0-9]+)?$/,
        inputErrorMessage: '请输入正确的密度值',
    }).then(({ value }) => {
        const postData = ref<any>({})
        postData.value = item
        postData.value.density = value
        editFuelWorkTInventory(postData.value).then(res => {
            console.log('修改----', res)
            if (res.code === 200) {
                ElMessage({
                    type: 'success',
                    message: '修改成功',
                })
                getFuelWorkTInventoryList()
            }
            else {
                ElMessage.error(res.msg)
            }
        })
    }).catch(() => {

    })

}

// 弹出框
const getFuelWorkPileReport = () => {
    siloDialogVisible2.value = true;
    getPileReport();
}

// 煤盘设置
const coalPileBunkerMsg = ref<any>({})
const coalPileMsg = ref<any>({})
const coalQualityInfo = ref<any>({})
const dailyReport = ref<any>({})
var bunkerId = 1;
const getPileReport = () => {
    pileReport(bunkerData.value[coalIndex.value].bunkerId, searchForm.value.executeTime).then(res => {
        console.log('煤盘设置----', res.data);
        bunkerId = res.data.bunkerId;
        coalPileBunkerMsg.value = res.data.coalPileBunkerMsg;

        coalPileMsg.value = res.data.coalPileMsg;
        coalQualityInfo.value = res.data.coalQualityInfo;
        dailyReport.value = res.data.dailyReport;
    })
}

onMounted(() => {
    // 获取页面高度
    tableHeight.value = window.innerHeight - 310;
    bunkerFileUrl().then(res => {
        state.value.fileUrl = res.data;
    });
    getGetAllBunkerData();
});

function view3D(id: number | undefined, executeId: number | undefined) {
    id = id || bunkerData.value[coalIndex.value]?.bunkerId;
    if (!executeId || executeId <= 0) {
        router.push(`/stock/yard?bunkerId=${id}`);
    }
    else {
        router.push(`/stock/yard?bunkerId=${id}&executeId=${executeId}`);
    }
}
/** 双击行展开 */
function rowDblclick(params: any) {
    if (state.value.expandRowKeys.length && params.executeId == state.value.expandRowKeys[0]) {
        state.value.expandRowKeys = [];
    } else {
        state.value.expandRowKeys = [params.executeId];
        expandChange(params,[params]);
    }
}
</script>
<template>
    <!-- 圆仓弹出框2 -->
    <el-dialog v-model="siloDialogVisible2" title="圆仓" width="1700" :align-center="true">
        <div class="silo_dialog" style="align-items: stretch;">
            <div class="silo_photo"
                style="flex-shrink: 0;width: 550px;margin-right: 15px;display: flex;flex-direction: column;justify-content: space-between;">
                <ul class="info" style="flex-shrink: 0;">
                    <li>
                        <span>盘存重量(吨)</span>
                        <p>{{ dailyReport.estimatedStorageAmount }}</p>
                    </li>
                    <li>
                        <span>与前次盘煤重量差(吨)</span>
                        <p>0</p>
                    </li>
                    <li>
                        <span>盘煤时间</span>
                        <p>{{ dailyReport.reportTime }}</p>
                    </li>
                </ul>
                <div class="ph_box" style="height: 100%;display: flex;align-items: center;justify-content: center;">
                    <img class="ph" style="width: 100%;height: auto" src="../../assets/img/ph_3d.jpg" alt="">
                    <p style="cursor: pointer;" @click="view3D(bunkerId,0)">查看三维模型</p>
                </div>
            </div>
            <div style="width: 1100px;" class="pile_right table_info small2">
                <h3>煤场情况一览表</h3>
                <table>
                    <tr>
                        <td>截止日期：{{ dailyReport.reportTime }}</td>
                        <td>煤质更新至{{ dailyReport.lastestVoyage }}航次</td>
                        <td>预估总存量</td>
                        <td>{{ dailyReport.estimatedStorageAmount }}吨</td>
                    </tr>
                </table>
                <div style="overflow-x: auto;">
                    <table>
                        <tr class="bg_yellow">
                            <th class="table_hd" style="min-width: 100px;"></th>
                            <td style="width: 1020px;" v-for="(item, index) in dailyReport.records" :colspan="item.records.length">
                                {{ item.areaRange }}
                            </td>
                        </tr>
                        <tr>
                            <th class="table_hd">存量</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.stockpileWeight }}</td>
                            </template>
                        </tr>
                        <tr>
                            <th class="table_hd">航次</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.voyage }}</td>
                            </template>
                        </tr>
                        <tr>
                            <th class="table_hd">母船</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.shipName }}</td>
                            </template>
                        </tr>
                        <tr>
                            <th class="table_hd">港口</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.harbour }}</td>
                            </template>
                        </tr>
                        <tr>
                            <th class="table_hd">煤种</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.coalType }}</td>
                            </template>
                        </tr>
                        <tr>
                            <th class="table_hd">水分</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.totalMoisture }}</td>
                            </template>
                        </tr>
                        <tr>
                            <th class="table_hd">挥发分</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.volatileMatter }}</td>
                            </template>
                        </tr>
                        <tr>
                            <th class="table_hd">固定碳</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.fixedCarbon }}</td>
                            </template>
                        </tr>
                        <tr>
                            <th class="table_hd">灰分</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.ashContent }}</td>
                            </template>
                        </tr>
                        <tr>
                            <th class="table_hd">硫S</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.sulfur }}</td>
                            </template>
                        </tr>
                        <tr>
                            <th class="table_hd">灰熔点t2</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.ashFusionPointT2 }}</td>
                            </template>
                        </tr>
                        <tr>
                            <th class="table_hd">发热量</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.calorificValue }}</td>
                            </template>
                        </tr>
                        <tr>
                            <th class="table_hd">堆期</th>
                            <template v-for="(item, index) in dailyReport.records">
                                <td v-for="itema in item.records">{{ itema.pileDate }}</td>
                            </template>
                        </tr>
                    </table>
                </div>
                <h3 class="mt15">煤种信息</h3>
                <table>
                    <colgroup>
                        <col width="25%">
                        <col width="25%">
                        <col width="25%">
                        <col width="25%">
                    </colgroup>
                    <tr v-if="coalPileMsg">
                        <th>所属煤场</th>
                        <td>{{ coalPileMsg.bunkerName }}</td>
                        <th>所在煤区</th>
                        <td>{{ coalPileMsg.bunkerArea }}</td>
                    </tr>
                    <tr v-if="coalPileMsg">
                        <th>所属煤种</th>
                        <td>{{ coalPileMsg.bunkerType }}</td>
                        <th>重量</th>
                        <td>{{ coalPileMsg.weight }}</td>
                    </tr>
                    <tr v-if="coalPileMsg">
                        <th>体积</th>
                        <td>{{ coalPileMsg.volume }}</td>
                        <th>密度</th>
                        <td>{{ coalPileMsg.density }}</td>
                    </tr>
                    <tr v-else>
                        <td colspan="4">暂无数据</td>
                    </tr>
                </table>

                <h3 class="mt15">煤质信息</h3>
                <table>
                    <tr>
                        <th>全水分</th>
                        <th>内水分</th>
                        <th>挥发分</th>
                        <th>固定碳</th>
                        <th>灰分</th>
                        <th>硫S</th>
                        <th>灰熔点t2</th>
                        <th>发热量</th>
                        <th>软化温度</th>
                    </tr>
                    <tr v-if="coalQualityInfo">
                        <td>{{ coalQualityInfo.totalMoisture }}</td>
                        <td>{{ coalQualityInfo.internalMoisture }}</td>
                        <td>{{ coalQualityInfo.volatileMatter }}</td>
                        <td>{{ coalQualityInfo.fixedCarbon }}</td>
                        <td>{{ coalQualityInfo.ashContent }}</td>
                        <td>{{ coalQualityInfo.sulfur }}</td>
                        <td>{{ coalQualityInfo.ashFusionPointT2 }}</td>
                        <td>{{ coalQualityInfo.calorificValue }}</td>
                        <td>{{ coalQualityInfo.softeningTemperature }}</td>
                    </tr>
                    <tr v-else>
                        <td colspan="9">暂无数据</td>
                    </tr>
                </table>
            </div>

        </div>
    </el-dialog>

    <!-- 圆仓弹出框 -->
    <el-dialog v-model="siloDialogVisible" title="圆仓" width="1500" :align-center="true">
        <div class="silo_dialog">
            <div class="silo_photo">
                <ul class="info">
                    <li>
                        <span>盘存重量(吨)</span>
                        <p>127157</p>
                    </li>
                    <li>
                        <span>与前次盘煤重量差(吨)</span>
                        <p>+789</p>
                    </li>
                    <li>
                        <span>盘煤时间</span>
                        <p>2023-09-09 10:00:00</p>
                    </li>
                </ul>
                <div class="ph_box">
                    <img class="ph" src="../../assets/img/head.jpg" alt="">
                </div>

            </div>
            <div class="silo_info">
                <div class="alert">
                    <img src="../../assets/img/ico_7.png" alt="">
                    <p>提示：点击图片各个煤区，可以查看煤区的详细信息</p>
                </div>
                <div class="table_info">
                    <table>
                        <colgroup>
                            <col width="25%">
                            <col width="25%">
                            <col width="25%">
                            <col width="25%">
                        </colgroup>
                        <tr>
                            <th>煤场名称</th>
                            <td>1#煤场</td>
                            <th>分区名称</th>
                            <td>0°-60°</td>
                        </tr>
                        <tr>
                            <th>盘煤时间</th>
                            <td>2023-09-09 10:00:01</td>
                            <th>登记人</th>
                            <td>王小丫</td>
                        </tr>
                    </table>
                    <h3>存煤明细</h3>
                    <table>
                        <colgroup>
                            <col width="25%">
                            <col width="25%">
                            <col width="25%">
                            <col width="25%">
                        </colgroup>
                        <tr>
                            <th>品名</th>
                            <th>所属煤种</th>
                            <th>堆体重量</th>
                            <th>堆体体积</th>
                        </tr>
                        <tr>
                            <td><a href="#" class="table_link" target="_blank">HM-20230909</a></td>
                            <td>褐煤</td>
                            <td>13092</td>
                            <td>13092</td>
                        </tr>
                    </table>
                    <h3>备注</h3>
                    <div class="beiz">
                        <p>1、于2020-09-09 10:00:09产生盘煤记录</p>
                        <p>2、王小丫在2020-09-10 12:33:09产生盘煤记录</p>
                    </div>
                </div>
            </div>
        </div>
    </el-dialog>

    <!-- 弹出框 -->
    <el-dialog v-model="tableDialogVisible" width="400" :align-center="true" center>
        <div class="table_dialog">
            <img src="../../assets/img/ico_5.png" alt="">
            <strong>您确定要保存修改内容吗？</strong>
            <span>
                修改内容保存后不可撤回，且会覆盖之前数据
            </span>
        </div>
        <template #footer>
            <div class="dialog-footer">
                <el-button @click="tableDialogVisible = false">取消</el-button>
                <el-button type="primary" @click="clickTableDialog">
                    确定
                </el-button>
            </div>
        </template>
    </el-dialog>

    <div class="record_search">
        <div class="name">所属煤场:</div>
        <ul class="record_search_tab">
            <li :class="coalIndex == index ? 'hover' : ''" v-for="(item, index) in bunkerData" @click="clickCoal(index)">
                {{ item.bunkerName }}
            </li>
        </ul>
        <div class="record_search_time">
            <div class="name">盘煤时间:</div>
            <!-- <div class="item"><el-button :class="searchTimeIndex == 0 ? 'hover' : ''"
                    @click="clickSearchTime(0)">近一天</el-button></div>
            <div class="item"><el-button :class="searchTimeIndex == 1 ? 'hover' : ''"
                    @click="clickSearchTime(1)">近一周</el-button></div>
            <div class="item"><el-button :class="searchTimeIndex == 2 ? 'hover' : ''"
                    @click="clickSearchTime(2)">近一个月</el-button></div> -->
            <div class="item">
                <el-date-picker v-model="searchForm.executeTime" type="date" :shortcuts="shortcuts" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                    placeholder="请选择" @change="changeSearchTime" />
            </div>
            <div class="item">
                <el-button type="primary" color="#2565C8" @click="getFuelWorkTInventoryList()">搜索</el-button>
            </div>
            <div class="item">
                <el-button style="padding:0 8px;" @click="resetForm()">
                    <el-icon size="20">
                        <Refresh />
                    </el-icon>
                </el-button>
            </div>

        </div>
    </div>

    <div class="box_bg mt15">
        <div class="record_set">
            <el-button type="primary" color="#2565C8" @click="getFuelWorkPileReport">盘煤设置</el-button>
        </div>
        <div class="table_list mt15">
            <el-table :data="listTableData" size="large" :border="false" :stripe="false" :highlight-current-row="false" :height="tableHeight"
                :header-cell-style="headerCellStyle" style="width: 100%;" :row-class-name="rowClassName" ref="multipleTableRef"
                @selection-change="handleSelectionChange" @expand-change="expandChange" row-key="executeId"
                :expand-row-keys="state.expandRowKeys" @row-dblclick="rowDblclick">
                <el-table-column type="selection" width="50" align="right" />
                <el-table-column type="expand">
                    <template #default="props">
                        <div class="table_list_info" v-loading="state.loadingDiff[`${props.row.executeId}`]" :class="rowInfoClassName(props.row.id)">
                            <div class="info_photo">
                                <img :src="props.row.fileName" style="position: relative;left: 0;top: 0;right: 0;bottom: 0;transform: translate(0%,0%);" />
                                <div style="background-color: #00B386; border-radius: 2px;position: absolute; right: 0; bottom: 0; color: #ffffff; padding: 10px 14px; cursor: pointer;"
                                    @click="view3D(props.row.parentBunkerId, props.row.executeId)">
                                    <span>查看三维模型</span>
                                </div>
                            </div>
                            <div class="table_info">
                                <table>
                                    <tr>
                                        <th colspan="3">与前次盘煤相比</th>
                                        <th rowspan="2">盘存文件</th>
                                    </tr>
                                    <tr>
                                        <th>堆煤</th>
                                        <th>取煤</th>
                                        <th>变化值</th>
                                    </tr>
                                    <tr>
                                        <td>{{ state.diffData[`${props.row.executeId}`]?.takeIn }}吨</td>
                                        <td>{{ state.diffData[`${props.row.executeId}`]?.takeOut }}吨</td>
                                        <td>
                                            <p v-if="state.diffData[`${props.row.executeId}`]?.difference > 0" class="red ico_p"><img src="../../assets/img/ico_red_up.png"
                                                    alt="">{{ state.diffData[`${props.row.executeId}`]?.difference }}</p>
                                            <p v-else-if="state.diffData[`${props.row.executeId}`]?.difference < 0" class="green ico_p"><img
                                                    src="../../assets/img/ico_green_down.png" alt="">{{ state.diffData[`${props.row.executeId}`]?.difference }}</p>
                                            <p v-else>{{ state.diffData[`${props.row.executeId}`]?.difference }}</p>
                                        </td>
                                        <td>
                                            <a :href="`${state.fileUrl}${searchForm.ParentBunkerId}Stockyard/${state.diffData[`${props.row.executeId}`]?.fileName}/${state.diffData[`${props.row.executeId}`]?.fileName}.xlsx`" target="_blank" download>
                                                {{ state.diffData[`${props.row.executeId}`]?.fileName }}
                                            </a>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column label="煤场名称" prop="bunkerName" />
                <el-table-column label="盘煤时间" prop="executeTime" min-width="150" />
                <el-table-column label="盘煤重量(吨）" prop="coalWeight" />
                <el-table-column label="堆体体积" prop="coalBulk" />
                <el-table-column label="密度" prop="density">
                    <!-- <template #default="props">
                        <el-input v-model="props.row.density" :suffix-icon="EditPen" />
                    </template> -->
                </el-table-column>
                <el-table-column label="登记班组" prop="teamName" />
                <el-table-column label="登记人" prop="userName" />
                <el-table-column label="来源" prop="doneBy" />
                <el-table-column align="center" label="操作" min-width="200">
                    <template #default="scope">
                        <div class="table_btn">
                            <a href="javascript:;" @click="clickEditDeviceTEnvmonitor(scope.row)">修改</a>|
                            <!-- <RouterLink to="">编辑</RouterLink>| -->
                            <a href="javascript:;" @click="clickDelFuelWorkTInventory(scope.row.executeId)">删除</a>|
                            <RouterLink :to="'/stock/record/info?eId=' + scope.row.executeId">查看详情</RouterLink>
                            <!-- <RouterLink to="/stock/record/report">报告</RouterLink> -->
                        </div>
                    </template>
                </el-table-column>

            </el-table>
        </div>
        <div class="pagination">
            <el-pagination v-model:current-page="searchForm.PageNum" v-model:page-size="searchForm.PageSize" @current-change="getFuelWorkTInventoryList"
                :total="totalPage" background layout="prev, pager, next" />
        </div>
    </div>
</template>
<style scoped lang="scss">
th.table_hd {
    position: sticky !important;
    left: 0;

    span {
        display: block;
        width: 70px;
        text-align: center;
    }
}

::v-deep(.el-table__body-wrapper) {
    background: #F6FAFE !important;
}

::v-deep(.el-table__inner-wrapper:before) {
    display: none; //下边线
}

::v-deep(.el-table thead th) {
    color: #333 !important;
    background: #CCDDF9;
}

::v-deep(.el-table__body) {
    border-spacing: 0px 13px !important;
}

::v-deep(.el-table__row td) {
    border-top: 1px solid #E0E5ED !important;
    border-bottom: 1px solid #E0E5ED !important;
}

::v-deep(.el-table__row td:first-child) {
    border-left: 1px solid #E0E5ED !important;
}

::v-deep(.el-table__row td:last-child) {
    border-right: 1px solid #E0E5ED !important;
}

::v-deep(.el-table__row:hover td) {
    background: #ecf5ff !important;
}

::v-deep(.el-table__expanded-cell) {
    border: 1px solid #E0E5ED !important;
    padding: 0 !important;
    //border-top: none !important; 
}

// ::v-deep(.el-table__expanded-cell td){
//     background: #ecf5ff!important;
// }
::v-deep(.el-table__expanded-cell:hover) {
    background-color: #ecf5ff !important;
}

::v-deep(.el-table__row.selected-row td) {
    background: #FFDE9A !important;
}
</style>